from typing import Optional, List
from pydantic import BaseModel
from datetime import datetime

class PetBase(BaseModel):
    name: str
    type: str
    breed: Optional[str] = None
    age: float
    gender: str
    health_status: str
    vaccine_status: str
    last_checkup: Optional[str] = None
    total_expense: Optional[float] = None
    notes: Optional[str] = None

class PetCreate(PetBase):
    user_id: int
    family_id: int

class PetUpdate(PetBase):
    id: int

class PetInDB(PetBase):
    id: int
    user_id: int
    family_id: int
    created_at: str
    updated_at: str
    
    class Config:
        orm_mode = True